﻿package com.flashframeless.net {
	
	import flash.external.ExternalInterface;
	
	public class Analytics {
		
		public static var VERBOSE:Boolean = false;
		
		public function Analytics() {
			
			trace( "Analytics is a static class and shouldn't be instantiated." );
			
		}
		
		public static function trackPage( page:String ):Boolean {
			
			if ( VERBOSE ) {
				trace( '---->>>Analytics<<<---PAGE:'+page+' is Tracked' );
			}
			
			if ( !ExternalInterface.call( "trackPage", page ) ) {
				
				trace( "ExternalInterface not avaible" );
				return false;
				
			} else {
				
				return true;
				
			}
			
		}
	}
	
}